package com.bjesc_b2c.app.appraiset.mvp.presenter.impl;

import android.content.Context;

import com.bjesc_b2c.app.appraiset.mvp.model.AppraiserModel;
import com.bjesc_b2c.app.appraiset.mvp.model.impl.AppraiserModelImpl;
import com.bjesc_b2c.app.appraiset.mvp.presenter.AppraiserPresenter;
import com.bjesc_b2c.app.appraiset.mvp.view.AppraiserView;

import java.util.List;

import master_bean.AppraiserBean;

/**
 * Created by yidong on 2017/5/31.
 */

public class AppraiserPresenterImpl implements AppraiserPresenter,AppraiserModelImpl.CallBack {
    private AppraiserModel appraiserModel;
    private AppraiserView appraiserView;
    public AppraiserPresenterImpl(AppraiserView view) {
        this.appraiserView = view;
        this.appraiserModel = new AppraiserModelImpl(this);
    }
    @Override
    public void getAllAppraiser() {
        appraiserModel.getAllAppraiser((Context)appraiserView);
    }
    @Override
    public void moveOrdersTrack(String dispatch_id, String toId, String content) {
        appraiserModel.moveOrdersTrack((Context)appraiserView,dispatch_id,toId,content);
    }

    @Override
    public void callbackDate(List<AppraiserBean> listbean) {
        appraiserView.getAllAppraiser(listbean);
    }

    @Override
    public void callbackInfo(String massage) {
        appraiserView.moveOrdersTrack(massage);
    }
}
